<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<!-- Set render engine for 360 browser -->
	<meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- HTML5 shim for IE8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <![endif]-->

	<link href="/public/simpleboot/themes/<?php echo C('SP_ADMIN_STYLE');?>/theme.min.css" rel="stylesheet">
    <link href="/public/simpleboot/css/simplebootadmin.css" rel="stylesheet">
    <link href="/public/js/artDialog/skins/default.css" rel="stylesheet" />
    <link href="/public/simpleboot/font-awesome/4.4.0/css/font-awesome.min.css"  rel="stylesheet" type="text/css">
    <style>
		.length_3{width: 180px;}
		form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
		.table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;}
		.table-list{margin-bottom: 0px;}
	</style>
	<!--[if IE 7]>
	<link rel="stylesheet" href="/public/simpleboot/font-awesome/4.4.0/css/font-awesome-ie7.min.css">
	<![endif]-->
<script type="text/javascript">
//全局变量
var GV = {
    DIMAUB: "/",
    JS_ROOT: "public/js/",
    TOKEN: ""
};
document.domain = "xinhuiwen.com";
</script>
<!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="/public/js/jquery.js"></script>
    <script src="/public/js/wind.js"></script>
    <script src="/public/js/publish.js"></script>

    <script src="/public/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<?php if(APP_DEBUG): ?><style>
		#think_page_trace_open{
			z-index:9999;
		}
	</style><?php endif; ?>
</head>
<body style="min-width: 800px;">
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="<?php echo U('commentadmin/index');?>">汇友圈管理</a></li>
		</ul>
            <form class="well form-search" method="get" >
                <input type="hidden" name="g" value="admin" />
                    <input type="hidden" name="m" value="FriendCircle" />
                    <input type="hidden" name="a" value="index" />
                    <input type="hidden" name="type" value="<?php echo ($search["type"]); ?>" />
			昵称： 
			<input type="text" name="author" style="width: 200px;" value="<?php echo ($search["author"]); ?>" placeholder="请输入昵称..."> &nbsp;&nbsp;
			时间：
			<input type="text" name="stime" class="js-datetime" value="<?php echo ($search["stime"]); ?>" style="width: 120px;" autocomplete="off">-
			<input type="text" class="js-datetime" name="etime" value="<?php echo ($search["etime"]); ?>" style="width: 120px;" autocomplete="off"> &nbsp; &nbsp;
			
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="<?php echo U('FriendCircle/index',array('live_id'=>$live_id));?>">清空</a>
		</form>
		<form class="js-ajax-form" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="50">ID</th>
						<th width="100">昵称</th>
						<th width="150">发布时间</th>
						<th>视频/图片地址</th>
						<th width="120">描述信息</th>
						<th width="50">点赞数量</th>
						<th width="80">评论数量</th>
                                                <th width="80">管理操作</th>
					</tr>
				</thead>
				<?php $status=array("1"=>L('AUDITED'),"0"=>L('NOT_AUDITED')); ?>
				<?php if(is_array($list)): foreach($list as $key=>$vo): ?><tr>
					<td><?php echo ($vo["tid"]); ?></td>
					<td><?php echo ($vo["author"]); ?></td>
					<td><?php echo (date('Y-m-d H:i:s',$vo["dateline"])); ?></td>
					<td><a class="" href="<?php echo ($vo["url"]); ?>"><?php echo ($vo["url"]); ?></a></td>
					<td><?php echo ($vo["subject"]); ?></td>
					<td><?php echo ($vo["recommends"]); ?></td>
                                        <td><a class="" href="<?php echo U('FriendComment/index',array('tid'=>$vo['tid']));?>"><?php echo ($vo["replies"]); ?></a></td>
					<td>
						
						<a href="<?php echo U('FriendCircle/delete',array('tid'=>$vo['tid']));?>" class="js-ajax-delete">删除</a>
                                                <a target="_blank" onclick="edit(<?php echo ($vo["tid"]); ?>)">修改描述信息</a> 
					</td>
				</tr><?php endforeach; endif; ?>
			</table>
			<div class="pagination"><?php echo ($page); ?></div>
		</form>
	</div>
	<script src="/public/js/common.js"></script>
        <script>
	function edit(id){
			var dialog = art.dialog({
			title: '修改描述信息', content: '<table><tbody style=""><tr><td><textarea name="data" id="subject" style="width: 98%; height: 50px;" placeholder="请填写描述信息"></textarea></td></tr></tbody></table>',
			follow: document.getElementById('btn2'),
			ok: function(){
                            var url = '<?php echo U('FriendCircle/edit');?>';
                            $.post(url, {'tid': id,'subject':$("#subject").val()}, function (json)
                            {
                                if(json.state === 'success'){
                                            reloadPage(window);
                                            return false;
                                }
                                alert(json.info)
                                art.dialog.close();
                            });
                            return false;
                        }
                        });
	}
</script>
</body>
</html>